﻿
namespace FileCloud.NET
{
    public class FileCloudAPIFileInfo
    {
        /// <summary>
        /// Constructor.
        /// </summary>
        /// <param name="response">Parsed JSON with fileinfo.</param>
        public FileCloudAPIFileInfo(dynamic response)
        {
            Status = response.status;
            Message = response.message;
            Ukey = response.ukey;
            Name = response.name;
            Size = response.size;
            Mime = response.mime;
        }

        #region Public properties

        /// <summary>
        /// It must be "ok" on successful result, or "error" if some error occurred.
        /// </summary>
        public string Status { get; set; }

        /// <summary>
        /// Error message in case if some error happend, or "fetched".
        /// </summary>
        public string Message { get; set; }

        /// <summary>
        /// The unique key for a file.
        /// </summary>
        public string Ukey { get; set; }

        /// <summary>
        /// File name.
        /// </summary>
        public string Name { get; set; }

        /// <summary>
        /// File size.
        /// </summary>
        public string Size { get; set; }

        /// <summary>
        /// File mime type.
        /// </summary>
        public string Mime { get; set; }

        #endregion

    }
}
